Relational Algebras are commonly utilized for optimizing queries, such as database queries. Nested Relational Algebras (NRAs) are a particular type of extension which are often utilized for compiling or optimizing nested data, such as XML. Previous embodiments have translated input queries into an NRA to be compiled into a low-level code. However, optimization of the compiled result has been limited.
In one previous attempt to further optimize compilations, TXE compiled queries without the use of NRAs, such that no traditional Algebraic optimizations occurred. In another previous attempt, Zorba, an open source solution, used no NRAs and instead implemented a rudimentary set non-NRA construct matching method to attempt to recognize Joins. Saxon also utilized no NRA. Galax utilized NRAs but with no further optimizations.